#ifndef __H_SIGNALEVENT_H__
#define __H_SIGNALEVENT_H__
#include "poller.h"
#include "concurrentqueue.h"
#include "eventitem.h"
#include "GameBase.h"

class CSignalEvent : public CPollerObject
{
public:
	CSignalEvent();
	virtual ~CSignalEvent();

	int create(void);
	int add(stEventItem* pitem);
	int signal(void);

	CGameBase* m_pServer;
private:
	int Init();
	int InputNotify(void);
	int HangupNotify(void);
	int handinput(void);
	int proc(void);

	int m_pipefd[2];

	moodycamel::ConcurrentQueue<stEventItem> m_queue;
};

#endif
